import { ref } from "vue"

interface Worker {
    account: string,
    password: string,
    roleId: string,
}

export const loginWorker = ref<Worker> ({
    account: "",
    password: "",
    roleId: "",
});

export const loginRules = ref({
    account: [{ message: "用户名不能为空", required: true, trigger: 'blur' },
    { min: 2, max: 30, message: "用户名长度必须在2-30之间", trigger: 'blur' }],
    password: [{ required: true, message: "密码不能为空", trigger: 'blur' },
    { min: 6, max: 30, message: "密码长度必须在6-30之间", trigger: 'blur' }],
    roleId: [{ required: true, message: "请选择职位", trigger: 'blur' }],
})